#ifndef CUSTOMCHART_H
#define CUSTOMCHART_H

#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>
#include <QtCharts/QValueAxis>
#include <QtCharts/QScatterSeries>
#include <QPainter>


QT_CHARTS_USE_NAMESPACE


#include <algorithm>
#include <cmath>



class CustomChart : public QChartView
{
    Q_OBJECT
public:
    double findMaxAbsoluteValue(const QVector<double>& data);
    CustomChart(const QVector<double> &data, QWidget *parent = nullptr);

    void setData(const QVector<double> &data);
private:
    QVector<double> m_data;
    QLineSeries *m_lineSeries;
    QScatterSeries *m_scatterSeries;
    QValueAxis *m_axisX;
    QValueAxis *m_axisY;
};

#endif // CUSTOMCHART_H
